package mutation;

import random.TestClusterBuilder;
import GA.*;
import util.*;

public abstract class MutationStrategy implements Mutation {

	protected abstract Chromosome mutate(Chromosome individual) throws ClassNotFoundException;
	protected abstract boolean getMutationFlag();
	protected GAInfo     gaInfo;
	public Chromosome mutateChromosome(Chromosome individual) throws ClassNotFoundException{		
		if(this.getMutationFlag() == false)
			return individual;
		individual=  this.mutate(individual);
		return	individual;
	}


	public final void setExtraInfo(GAInfo gaInfo) {
		this.gaInfo     = gaInfo;

	}


}
